home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls035c.1 / lib / vtcl / tests / input.tcl / input.tcl
Encoding:
Text File  |  1995-03-23  |  468 b   |  28 lines

  1. #
  2. # This test that wstcl will work with even connecting to 
  3. # wserver.
  4. #
  5. # To test type the following
  6. #    cat /etc/termcap | wstcl input.tcl
  7. # You should see the file scrolling on the screen
  8. proc echoCB {id} {
  9.      set count [gets $id line]
  10.  
  11.      if { $count == -1 } {
  12.     echo "\n\nPASSED input.tcl"
  13.     exit 0
  14.      }
  15.      
  16.      puts stdout "." nonewline
  17.  
  18.      VtRemoveInput $id
  19.      VtAddInput $id echoCB
  20. }
  21.  
  22. set f [open /etc/termcap]
  23.  
  24. VtAddInput $f echoCB
  25.  
  26. VtMainLoop
  27.